<%@page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@taglib prefix="jstl" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@taglib prefix="security"
	uri="http://www.springframework.org/security/tags"%>
<%@taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@taglib prefix="acme" tagdir="/WEB-INF/tags"%>

<form:form action="${requestURI}" modelAttribute="gallery">

	<form:hidden path="id" />
	<form:hidden path="version" />
	<form:hidden path="customer" />
	<form:hidden path="paintings" />

	<jstl:if test="${isNew}">
		<acme:textbox code="gallery.title" path="title" />
	</jstl:if>

	<jstl:if test="${!isNew}">
		<acme:textbox code="gallery.title" path="title" readonly="true"/>
	</jstl:if>

	<!--  Buttons -->

	<jstl:if test="${isNew }">
		<acme:submit code="gallery.new" name="save" />
	</jstl:if>

	<jstl:if test="${!isNew}">

		<jstl:if test="${!eraseable }">
			<acme:cancel code="gallery.viewPaintings"
				url="/painting/customer/galleryList.do?galleryId=${galleryId}" />
		</jstl:if>

		<jstl:if test="${eraseable }">
			<acme:submit code="gallery.delete" name="delete" />
		</jstl:if>
	</jstl:if>

	<acme:cancel code="gallery.goBack" url="${backURI}" />
</form:form>

